package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.CheckInPeopleAddDTO;
import org.jsola.hr.dto.CheckInPeopleUpdateDTO;
import org.jsola.hr.query.CheckInPeopleQuery;
import org.jsola.hr.query.StatisicsPageEmpExportQuery;
import org.jsola.hr.vo.CheckInPeopleListVO;
import org.jsola.hr.vo.CheckInPeopleVO;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import java.util.List;

/**
 * 预登记人员
 *
 * @author zhr
 */
@Api(tags = "hr-预登记人员")
public interface ICheckInPeopleControllerAPI {

    /**
     * 预登记人员识别身份证
     *
     * @param checkInPeopleQuery 预登记人员查询参数
     * @return CheckInPeopleListVO
     */
    @ApiOperation(value = "预登记人员识别身份证")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleQuery", dataType = "CheckInPeopleQuery", value = "预登记人员查询参数", paramType = "body")
    })
    Result<CheckInPeopleListVO> identificationCard(CheckInPeopleQuery checkInPeopleQuery);

    /**
     * 批量修改预登记信息
     *
     * @param checkInPeopleUpdateDTO 预登记人员
     * @return 更新数量
     */
    @ApiOperation(value = "批量修改预登记信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleUpdateDTO", dataType = "CheckInPeopleUpdateDTO", value = "修改预登记人员", paramType = "body")
    })
    Result<Integer> batchUpdate(CheckInPeopleUpdateDTO checkInPeopleUpdateDTO);

    /**
     * 新增预登记人员
     *
     * @param checkInPeopleAddDTO 预登记人员新增实体
     * @return 预登记人员展示对象
     */
    @ApiOperation(value = "新增预登记人员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleAddDTO", dataType = "CheckInPeopleAddDTO", value = "新增预登记人员", paramType = "body")
    })
    Result<CheckInPeopleVO> save(CheckInPeopleAddDTO checkInPeopleAddDTO);

    /**
     * 小程序新增预登记人员
     *
     * @param checkInPeopleAddDTO 预登记人员新增实体
     * @return 预登记人员展示对象
     */
    @ApiOperation(value = "小程序新增预登记人员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleAddDTO", dataType = "CheckInPeopleAddDTO", value = "新增预登记人员", paramType = "body")
    })
    Result<CheckInPeopleVO> saveForMini(CheckInPeopleAddDTO checkInPeopleAddDTO);

    /**
     * 导入excel，新增预登记人员
     *
     * @param file excel
     * @return 出错的数据(电话重复)
     */
    @ApiOperation(value = "导入excel，新增渠道管理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "file", dataType = "MultipartFile", value = "确认离职EXCEL", paramType = "body")
    })
    Result<List<CheckInPeopleVO>> importCheckInPeople(MultipartFile file);


    /**
     * 修改预登记人员
     *
     * @param checkInPeopleUpdateDTO 预登记人员
     * @return 更新数量
     */
    @ApiOperation(value = "修改预登记人员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleUpdateDTO", dataType = "CheckInPeopleUpdateDTO", value = "修改预登记人员", paramType = "body")
    })
    Result<Integer> update(CheckInPeopleUpdateDTO checkInPeopleUpdateDTO);


    /**
     * 删除单个预登记人员，彻底删除
     *
     * @param checkInPeopleId 预登记人员id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个预登记人员，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleId", dataType = "String", value = "预登记人员id", paramType = "path")
    })
    Result<Integer> delete(String checkInPeopleId);


    /**
     * 批量删除预登记人员，彻底删除
     *
     * @param checkInPeopleIds 预登记人员id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除预登记人员，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleIds", dataType = "String[]", value = "预登记人员id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] checkInPeopleIds);


    /**
     * 根据预登记人员id查询预登记人员详情
     *
     * @param checkInPeopleId 预登记人员id
     * @return 预登记人员详情
     */
    @ApiOperation(value = "根据预登记人员id查询预登记人员详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleId", dataType = "String", value = "预登记人员id", paramType = "path")
    })
    Result<CheckInPeopleVO> findById(String checkInPeopleId);


    /**
     * 查询预登记人员
     *
     * @param checkInPeopleQuery 预登记人员查询参数
     * @return page
     */
    @ApiOperation(value = "查询预登记人员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleQuery", dataType = "CheckInPeopleQuery", value = "预登记人员查询参数", paramType = "query")
    })
    Result<List<CheckInPeopleListVO>> listAll(CheckInPeopleQuery checkInPeopleQuery);


    /**
     * 分页查询预登记人员
     *
     * @param checkInPeopleQuery 预登记人员查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询预登记人员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleQuery", dataType = "CheckInPeopleQuery", value = "预登记人员查询参数", paramType = "query")
    })
    Result<Page<CheckInPeopleListVO>> page(CheckInPeopleQuery checkInPeopleQuery);

    /**
     * 导出预登记人员信息
     *
     * @param checkInPeopleQuery 查询条件
     * @return 文件路径
     */
    @ApiOperation(value = "导出预登记人员信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleQuery", dataType = "CheckInPeopleQuery", value = "预登记人员查询参数", paramType = "query")
    })
    ResponseEntity<Resource> checkInPeopleExport(CheckInPeopleQuery checkInPeopleQuery);

    /**
     * 导出今日新增预登记人员信息
     *
     * @param statisicsPageEmpExportQuery 导出参数
     * @return excel
     */
    @ApiOperation(value = "导出预登记人员信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "statisicsPageEmpExportQuery", dataType = "StatisicsPageEmpExportQuery", value = "预登记人员查询参数", paramType = "body")
    })
    ResponseEntity<Resource> checkTodayAddExport(@Valid StatisicsPageEmpExportQuery statisicsPageEmpExportQuery);

    /**
     * 管理端小程序分页查询预登记人员
     *
     * @param checkInPeopleQuery 查询条件
     * @return 预登记人员
     */
    @ApiOperation(value = "管理端小程序分页查询预登记人员")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkInPeopleQuery", dataType = "CheckInPeopleQuery", value = "查询参数", paramType = "query")
    })
    Result<Page<CheckInPeopleListVO>> pageForMini(@Valid CheckInPeopleQuery checkInPeopleQuery);
}

